<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/gesture-util.js"></script>
<script src="../../resources/compositor-controls.js"></script>
<script src="./resources/middleClickAutoscroll.js"></script>
<style type="text/css">
#scrollable {
  height: 200px;
  overflow: auto;
  border: solid 3px #cc0000;
  font-size: 80px;
}
</style>
<script>
var mousedown_fired = false;
window.addEventListener('mousedown', function(event) {
  mousedown_fired = true;
});

function start() {
  testSetUp({
    'clickOrDrag': 'drag',
    'scrollable': $('scrollable'),
    'finishTest': function() {
      assert_true(mousedown_fired);
    },
  });
}
</script>
<body onload="start()">
<div id="container">
<p id="description"></p>
Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32303">bug 32303</a> This tests that pan
scrolling works without event.preventDefault and the middle button mousedown event is fired.
To test manually, try to pan scroll inside this div.
<div id="scrollable"></div>
</div>
<div id="console"></div>
</body>
